home *** CD-ROM | disk | FTP | other *** search
/ Aminet 8 / Aminet 8 (1995)(GTI - Schatztruhe)[!][Oct 1995].iso / Aminet / comm / cnet / HowTo.lha / HowTo.rexx < prev    next >
OS/2 REXX Batch file  |  1995-07-25  |  5KB  |  168 lines

  1.  
  2. /*
  3.  
  4. Callers can type "HowTo" at any CNet-BBS prompt and see a list of
  5. commonly used HOW-TO files.
  6.  
  7. >       Commonly Used How-To Files
  8. >
  9. > [A] How to gain higher "paid" access.
  10. > [B] How to gain higher "non-paid" access.
  11. > [C] How to access Merit/Michnet.
  12. > [D] How to put your files into the ADS/SKY Fidonet File Echo.
  13. > [E] How to put your files into the Internet AmiNet file site (and CD-ROM).
  14. > [F] How to put your files into the Fred Fish collection (floppy or CD-ROM).
  15. > [G] How to order Fred Fish CD-ROMs.
  16. > [H] How to get Amiga files via the Internet with "Anonymous FTP".
  17. > [I] How to "Telnet" to any site on the Internet.
  18. > [J] How to access Internet FTP/WWW/GOPHER/NEWS/ETC via email.
  19. > [K] How to access the Internet for free (via 100s of freenet.org sites).
  20. > [L] How to send Fidonet email to/from the Internet.
  21. > [M] How to become a Fidonet Echo moderator.
  22. > [N] How to create a new Internet NewsGroup.
  23. > [O] How to get the full text of classic books via email.
  24. > [P] How to write code correctly.
  25. > [Q] How to upgrade a USRobotics 28.8k modem to 33.6k.
  26. >
  27. > Selection:
  28.  
  29. Installation:
  30. 1) Copy HowTo.rexx TO pfiles:HowTo.rexx
  31.    Copy HowTo.dat  TO SysData:HowTo.dat
  32.  
  33. 2) Add the following line onto the END of the CNet:BBSmenu list
  34.    marked as "2; Available everywhere:"
  35.    > HOWtodo | {#0 pfiles:HowTo.rexx  SysData:HowTo.dat}
  36.  
  37.    You can have as many different sets of How-To menus as you like.
  38.    Just give each one a different config filename.
  39.    > HOWNOW | {#0  pfiles:HowTo.rexx  SysData:HowNow.dat}
  40.    > WHAT   | {#0  pfiles:HowTo.rexx  SysData:What.dat}
  41.    > WHERE  | {#0  pfiles:HowTo.rexx  SysData:Where.dat}
  42.    > WHEN   | {#0  pfiles:HowTo.rexx  SysData:When.dat}
  43.  
  44. 3) Create/edit the config file called "SysData:HowTo.dat".
  45.    The format is alternate lines of:
  46.       > Text to show the user in menu.
  47.       > DOS cmd to execute.
  48.       > --- [blank line] ---
  49.       > Text to show the user in menu.
  50.       > DOS cmd to execute.
  51.       > --- [blank line] ---
  52.       > Text to show the user in menu.
  53.       > DOS cmd to execute.
  54.       > ---- [blank line] ---
  55.       > Unlimited # of lines.
  56.       > Unlimited # of lines.
  57.       > --- [blank line] ---
  58.  
  59. $VER: HowTo.rexx v1.0 Sat 22-Jul-95 22:35:11
  60.    Hitting "?" will show filename, version #, and config file.
  61.    Written/tested with CNet v3.05c
  62.  
  63. Author Info:
  64.    Bill Beogelein
  65.    Box 530441
  66.    Livonia, MI 48153
  67.    SysOp of The Amiga ShareWare HeadQuarters BBS 1-810-473-2020
  68.    Fido: 1:2410/207,  UUCP: ag775@detroit.freenet.org
  69.  
  70. Future Plans:
  71.    Write to CNet log.
  72.    Please report all bugs, and make suggestions for new features.
  73.  
  74. Ignore:
  75.    lz u CNet3:HowTo.LHA pfiles:rexx/HowTo.rexx a:zzzBBS Help:BB_CMDS SysData:HowTo.dat
  76.  
  77. ********************** End of docs *******************************/
  78.  
  79. LF  ='0a'x
  80. BELL='07'x
  81.  
  82. options results
  83. parse arg cfgFile
  84.  
  85. 'ChangeWhere' "HowTo.rexx"
  86. 'getUser' 23; port= RESULT
  87. tmpFile= "t:HowTo." || port || ".tmp"
  88.  
  89. parse SOURCE arexxFile
  90. arexxFile= word(arexxFile, 3)
  91. call LoadCfg()
  92.  
  93. do forever
  94.    'transmit' LF LF ">6 Commonly Used 'How-To' Files" LF
  95.    do i=1 to count
  96.       'transmit' " [" || d2c(i+64) || "]" menuTxt.i
  97.    end
  98.  
  99.    'sendString' LF || " Selection: "
  100.    'getChar'
  101.    ans= RESULT
  102.  
  103.    if(ans=='?') then
  104.    do
  105.       'sendString' LF LF || arexxFile "by Bill Beogelein 1-810-473-2020"
  106.       call dos("Version FULL FILE" arexxFile)
  107.       'sendString' LF || "---" cfgFile "CUT HERE ---"
  108.       'sendFile' cfgFile
  109.       'transmit' "---" cfgFile "CUT HERE ---"
  110.       iterate
  111.    end
  112.  
  113.    if(ans<'A' | ans>'Z') then
  114.    do
  115.       'transmit' "n2 Returning to the BBS."
  116.       exit
  117.    end
  118.  
  119.    'sendString' ans
  120.    ans= c2d(ans)-64
  121.    if(ans>count) then      /* User pick is out of range */
  122.    do
  123.       'transmit' "n2 *** Choice not available.n1"
  124.       iterate
  125.    end
  126.    else
  127.    do
  128.       call dos(dosCmd.ans)
  129.       'sendString' LF "Hit any key to continue: "
  130.       'getChar'
  131.    end
  132. end
  133. exit        /****** End of main ******/
  134.  
  135. DOS:  PROCEDURE EXPOSE tmpFile
  136.    parse arg cmd
  137.    address command cmd ">" || tmpFile
  138.    'sendFile' tmpFile
  139.    address command "Delete >nil: <nil:" tmpFile
  140. return
  141.  
  142. LoadCfg:
  143.    if( cfgFile=="" ) then
  144.    do
  145.       'transmit' LF "***" arexxFile "can't open config file." BELL
  146.       exit
  147.    end
  148.  
  149.    count=0
  150.    if( open(fp, cfgFile, 'READ') ) then
  151.    do
  152.       do while(~eof(fp))
  153.          count= count+1
  154.          MenuTxt.count = readLN(fp)
  155.          dosCmd.count  = readLN(fp)
  156.          dummy         = readLN(fp)
  157.       end
  158.       count= count-1
  159.    end
  160.    else
  161.    do
  162.       'transmit' LF "***" arexxFile "can't open" cfgFile "for reading." BELL
  163.       exit
  164.    end
  165. return
  166.  
  167. /*** EOF HowTo.rexx 810-473-2020 ***/
  168.